<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>flex</title>
    <style>
        body {
            background-color: black;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
        }
        [class$="face"] {
            width: 100px;
            height: 100px;
            padding: 4px;
            margin: 25px;
            border-radius: 5%;
            box-shadow:     
                inset 0 5px white, 
                inset 0 -5px #BBB,
                inset -5px 0 #D7D7D7,
                inset 5px 0 #D7D7D7; 
            background-color: #E7E7E7;
        }
        .pip {
            display: block;
            width: 24px;
            height: 24px;
            margin: 4px;
            border-radius: 50%;
            box-shadow: 
                inset 0 3px #111,
                inset 0 -3px #555;
            background-color: #333;
        }
        .first-face {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .second-face {
            display: flex;            
            justify-content: space-between;
        }
        .second-face .pip:nth-child(2) {
            align-self: flex-end;
        }
        .third-face {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .third-face .pip:nth-child(1) {
            align-self: flex-start;
        }
        .third-face .pip:nth-child(3) {
            align-self: flex-end;
        }
        .fourth-face {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .fourth-face .row {
            display: flex;
            justify-content: space-between;
        }
        .fifth-face {
            display: flex;
        }
        .fifth-face .column {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .fifth-face .column:nth-child(2) {
            justify-content: center;
        }
        .sixth-face {
            display: flex;
            justify-content: space-between;
        }
        .sixth-face .column {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
    </style>
</head>
<body>
    <div class="first-face">
        <span class="pip"></span>
    </div>
    <div class="second-face">
        <span class="pip"></span>
        <span class="pip"></span>
    </div>
    <div class="third-face">
        <span class="pip"></span>
        <span class="pip"></span>
        <span class="pip"></span>
    </div>
    <div class="fourth-face">
        <div class="row">
            <span class="pip"></span>
            <span class="pip"></span>
        </div>
        <div class="row">
            <span class="pip"></span>
            <span class="pip"></span>
        </div>
    </div>
    <div class="fifth-face">
        <div class="column">
            <span class="pip"></span>
            <span class="pip"></span>
        </div>
        <div class="column">
            <span class="pip"></span>
        </div>
        <div class="column">
            <span class="pip"></span>
            <span class="pip"></span>
        </div>
    </div>
    <div class="sixth-face">
        <div class="column">
            <span class="pip"></span>
            <span class="pip"></span>
            <span class="pip"></span>
        </div>
        <div class="column">
            <span class="pip"></span>
            <span class="pip"></span>
            <span class="pip"></span>
        </div>
    </div>
</body>
</html>